const mysql = require('mysql');
const IP = 'gaojn@127.0.0.1:3306';
const userName = 'gaojn';
const pwd = '1234';
const DBname = 'wechat'
const db = mysql.createPool({
  host:IP,
  port:3306,
  user:userName,
  password:pwd,
  database:DBname,
});
// connection.connect((err) => {
//   if (err) {
//     console.log(err)
//     return;
//   }
//   console.log('数据库链接成功！')
// });
module.exports =  db